import sys,os

import pandas as pd

dataPath=sys.path[0]
fullData=pd.DataFrame()
fullData.columns=["操作序号","操作员代码","操作员编号","操作员","所属公司","复核人员","发生日期","发生时间","操作分类","功能模块","菜单名称","操作内容","备注","登录机器名","IP地址","网卡地址","硬盘VOL序号","系统名","取消标志","客户端类型","业务日期","操作员接入AR的IP地址","开发者授权编号"]
for root, dirs, files in os.walk(dataPath):
    if files.split('.')[-1] == 'XLS':
        data=pd.read_excel(os.path.join(dataPath,files))
        fullData=pd.concat([fullData,data],axis=0)
        print(len(fullData)) #当前路径下所有非目录子文件

# oneData=fullData.drop_duplicates(subset=['发生日期',"操作员编号"])
# fullData.to_csv(r"C:\Users\AXZQ\Desktop\新建文件夹\恒生PB\all.csv")
# oneData.to_csv(r"C:\Users\AXZQ\Desktop\新建文件夹\恒生PB\one.csv")
